package cn.melon.view.admin.store.ctr;

import java.awt.Dialog;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import org.apache.log4j.Logger;

import cn.melon.helper.LoggerHelper;
import cn.melon.mod.store.entity.Goods;
import cn.melon.view.admin.store.AddGoodsDig;
import cn.melon.view.admin.store.GoodsInfoDig;
import cn.melon.view.admin.store.StoreJPanel;

public class StoreTableMouse extends MouseAdapter {

    private Logger StoreTableMouseLog = LoggerHelper.clientLogger();
    
    private GoodsInfoDig dialog = null;    
    private StoreJPanel panel = null;

    public StoreTableMouse(StoreJPanel panel) {
        this.panel = panel;
    }
    @Override
    public void mouseClicked(MouseEvent e){
        if(e.getClickCount() == 2){
            Goods goods = panel.getTableRow();
            StoreTableMouseLog.info(goods);
            dialog = new GoodsInfoDig(goods);
            dialog.setVisible(true);

        }
    }
}
